home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume15 / dmake-3.6 / patch04 < prev    next >
Encoding:
Text File  |  1990-12-16  |  38.8 KB  |  1,109 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: dvadura@watdragon.waterloo.edu
  3. subject: v15i093: dmake version 3.6 patch 1 (part 04/5)
  4. from: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  5. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  6.  
  7. Posting-number: Volume 15, Issue 93
  8. Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  9. Archive-name: dmake-3.6/patch04
  10.  
  11. #!/bin/sh
  12. # this is part 4 of a multipart archive
  13. # do not concatenate these parts, unpack them in order with /bin/sh
  14. # file dm36.p1 continued
  15. #
  16. CurArch=4
  17. if test ! -r s2_seq_.tmp
  18. then echo "Please unpack part 1 first!"
  19.      exit 1; fi
  20. ( read Scheck
  21.   if test "$Scheck" != $CurArch
  22.   then echo "Please unpack part $Scheck next!"
  23.        exit 1;
  24.   else exit 0; fi
  25. ) < s2_seq_.tmp || exit 1
  26. sed 's/^X//' << 'SHAR_EOF' >> dm36.p1
  27. XX***************
  28. XX*** 34,39 ****
  29. XX--- 34,46 ----
  30. XX   * 
  31. XX  */
  32. XX  
  33. XX+ #if defined (_MSC_VER)
  34. XX+ # if _MSC_VER < 500
  35. XX+     Force a compile-time blowup.
  36. XX+     Do not define define _MSC_VER for MSC compilers ealier than 5.0.
  37. XX+ # endif
  38. XX+ #endif
  39. XX+ 
  40. XX  /* define this for configurations that don't have the coreleft function
  41. XX   * so that the code compiles.  To my knowledge coreleft exists only on
  42. XX   * Turbo C, but it is needed here since the function is used in many debug
  43. XX***************
  44. XX*** 48,57 ****
  45. XX  #   define SIGTERM SIGINT
  46. XX  #endif
  47. XX  
  48. XX! /* Fixes unimplemented line buffering for MSC
  49. XX   * MSC _IOLBF is the same as _IOFBF
  50. XX-  * This redefinition causes the following warning, but ignore it
  51. XX-  * c:/usr/include/stdio.h(129) : warning C4005: '_IOLBF' : macro redefinition
  52. XX   */
  53. XX  #if defined(MSDOS) && defined (_MSC_VER)
  54. XX  #   undef  _IOLBF
  55. XX--- 55,62 ----
  56. XX  #   define SIGTERM SIGINT
  57. XX  #endif
  58. XX  
  59. XX! /* Fixes unimplemented line buffering for MSC 5.x and 6.0.
  60. XX   * MSC _IOLBF is the same as _IOFBF
  61. XX   */
  62. XX  #if defined(MSDOS) && defined (_MSC_VER)
  63. XX  #   undef  _IOLBF
  64. XX***************
  65. XX*** 59,65 ****
  66. XX  #endif
  67. XX  
  68. XX  /* in alloc.h: size_t is redefined
  69. XX!  * defined in stdio.h which is included alloc.h
  70. XX   */
  71. XX  #if defined(MSDOS) && defined (_MSC_VER)
  72. XX  #   define _TYPES_
  73. XX--- 64,70 ----
  74. XX  #endif
  75. XX  
  76. XX  /* in alloc.h: size_t is redefined
  77. XX!  * defined in stdio.h which is included by alloc.h
  78. XX   */
  79. XX  #if defined(MSDOS) && defined (_MSC_VER)
  80. XX  #   define _TYPES_
  81. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/exec.h    Sat Oct  6 12:05:40 1990
  82. XX--- msdos/exec.h    Sun Oct 28 23:16:16 1990
  83. XX***************
  84. XX*** 9,16 ****
  85. XX  #endif
  86. XX  #endif
  87. XX  
  88. XX! extern int  exec ANSI((int, char far *, char far *, unsigned int,
  89. XX!                unsigned int, char far *));
  90. XX  
  91. XX  #ifndef MK_FP
  92. XX  #define MK_FP(seg,ofs) \
  93. XX--- 9,15 ----
  94. XX  #endif
  95. XX  #endif
  96. XX  
  97. XX! extern int  exec ANSI((int, char far *, char far *, unsigned int, char far *));
  98. XX  
  99. XX  #ifndef MK_FP
  100. XX  #define MK_FP(seg,ofs) \
  101. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/exec.asm    Sat Oct  6 12:05:50 1990
  102. XX--- msdos/exec.asm    Sun Oct 28 23:16:15 1990
  103. XX***************
  104. XX*** 1,6 ****
  105. XX! ; You must assemble this file with masm (or tasm) flag
  106. XX! ;    /dmmodel where model is one of {small, compact, medium, large}
  107. XX  ;
  108. XX  ifdef msmall
  109. XX              .model    small
  110. XX  argbase        equ    4
  111. XX--- 1,44 ----
  112. XX! ; SYNOPSIS
  113. XX! ;      Exec code for the swapping version of DOS spawn.
  114. XX! ; 
  115. XX! ; DESCRIPTION
  116. XX! ;      This code is a model independent version of DOS exec that will swap
  117. XX! ;      the calling process out to secondary storage prior to running the
  118. XX! ;      child.  The prototype for calling the exec function is below.
  119. XX  ;
  120. XX+ ;      exec( int swap, char far *program, char far *cmdtail,
  121. XX+ ;         int environment_seg, int env_size, char far *tmpfilename );
  122. XX+ ;
  123. XX+ ;
  124. XX+ ;      To assemble this file issue the command:
  125. XX+ ;
  126. XX+ ;         tasm /mx /t /dmmodel exec.asm
  127. XX+ ;
  128. XX+ ;      where 'model' is one of {small, compact, medium, large}, you may
  129. XX+ ;      also use MASM 5.1 to assemble this file, in this case simply replace
  130. XX+ ;      'tasm' with 'masm' in the above command line.
  131. XX+ ;
  132. XX+ ; AUTHOR
  133. XX+ ;      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  134. XX+ ;      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  135. XX+ ;
  136. XX+ ; COPYRIGHT
  137. XX+ ;      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  138. XX+ ; 
  139. XX+ ;      This program is free software; you can redistribute it and/or
  140. XX+ ;      modify it under the terms of the GNU General Public License
  141. XX+ ;      (version 1), as published by the Free Software Foundation, and
  142. XX+ ;      found in the file 'LICENSE' included with this distribution.
  143. XX+ ; 
  144. XX+ ;      This program is distributed in the hope that it will be useful,
  145. XX+ ;      but WITHOUT ANY WARRANTY; without even the implied warrant of
  146. XX+ ;      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  147. XX+ ;      GNU General Public License for more details.
  148. XX+ ; 
  149. XX+ ;      You should have received a copy of the GNU General Public License
  150. XX+ ;      along with this program;  if not, write to the Free Software
  151. XX+ ;      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  152. XX+ ;
  153. XX  ifdef msmall
  154. XX              .model    small
  155. XX  argbase        equ    4
  156. XX***************
  157. XX*** 21,28 ****
  158. XX  a_prog        equ    <bp+argbase+2>
  159. XX  a_tail        equ    <bp+argbase+6>
  160. XX  a_env         equ    <bp+argbase+10>
  161. XX! a_esiz        equ    <bp+argbase+12>
  162. XX! a_tmp        equ    <bp+argbase+14>
  163. XX  
  164. XX  
  165. XX  ; Define all useful equ's
  166. XX--- 59,65 ----
  167. XX  a_prog        equ    <bp+argbase+2>
  168. XX  a_tail        equ    <bp+argbase+6>
  169. XX  a_env         equ    <bp+argbase+10>
  170. XX! a_tmp        equ    <bp+argbase+12>
  171. XX  
  172. XX  
  173. XX  ; Define all useful equ's
  174. XX***************
  175. XX*** 49,57 ****
  176. XX  old_ss        dw    ?        ; save stack seg across exec
  177. XX  old_sp        dw    ?        ; save stack ptr across exec
  178. XX  progsize    dw    ?        ; original size of the program
  179. XX  resend        dw    ?        ; paragraph where resident code ends
  180. XX  envseg        dw    ?        ; paragraph of environment segment
  181. XX- envsize        dw    ?        ; length of environment in paragraphs
  182. XX  psp        dw    ?        ; our own psp
  183. XX  swap        dw    ?        ; swapping selection flag
  184. XX  retcode        dw    ?        ; return code from exec
  185. XX--- 86,94 ----
  186. XX  old_ss        dw    ?        ; save stack seg across exec
  187. XX  old_sp        dw    ?        ; save stack ptr across exec
  188. XX  progsize    dw    ?        ; original size of the program
  189. XX+ rootsize    dw    ?        ; size of base root kept during swap
  190. XX  resend        dw    ?        ; paragraph where resident code ends
  191. XX  envseg        dw    ?        ; paragraph of environment segment
  192. XX  psp        dw    ?        ; our own psp
  193. XX  swap        dw    ?        ; swapping selection flag
  194. XX  retcode        dw    ?        ; return code from exec
  195. XX***************
  196. XX*** 126,132 ****
  197. XX  ; First define the critical-error and control-brk handlers. 
  198. XX  ; The critical error handler simply pops the machine state and returns an
  199. XX  ; access denied result code.
  200. XX! crit_err_handler proc near
  201. XX          add    sp, 6        ; ip/cs/flags ...
  202. XX          pop    ax
  203. XX          pop    bx
  204. XX--- 163,169 ----
  205. XX  ; First define the critical-error and control-brk handlers. 
  206. XX  ; The critical error handler simply pops the machine state and returns an
  207. XX  ; access denied result code.
  208. XX! crit_err_handler proc far
  209. XX          add    sp, 6        ; ip/cs/flags ...
  210. XX          pop    ax
  211. XX          pop    bx
  212. XX***************
  213. XX*** 150,174 ****
  214. XX  
  215. XX  ;-----------------------------------------------------------------------------
  216. XX  ; Here we set the interrupted flag, and terminate the currently running
  217. XX! ; ess. proc 
  218. XX! ctl_brk_handler proc near
  219. XX          inc    cs:interrupted        ; set the flag
  220. XX  
  221. XX  ; Make certain it isn't us that is going to get terminated.
  222. XX  ; There is a small window where the in_exec flag is set but the child is
  223. XX  ; not running yet, I assume that DOS doesn't test for ctl_brk at that time
  224. XX! ; as it is bussily creating a new ess. proc 
  225. XX          cmp    cs:in_exec,0
  226. XX!         je    just_return
  227. XX!         mov    ax, 04cffH        ; stop the sucker!
  228. XX!         int    21H
  229. XX! just_return:    ret
  230. XX  ctl_brk_handler endp
  231. XX  
  232. XX  
  233. XX  ;-----------------------------------------------------------------------------
  234. XX  ; Something really nasty happened, so abort the exec call and exit.
  235. XX! ; This kills the calling ess proc altogether, and is a very nasty way of
  236. XX  ; termination since files may still be open etc.
  237. XX  abort_exec_rhdr label near
  238. XX          mov    dx, offset error_rhdr
  239. XX--- 187,211 ----
  240. XX  
  241. XX  ;-----------------------------------------------------------------------------
  242. XX  ; Here we set the interrupted flag, and terminate the currently running
  243. XX! ; process.
  244. XX! ctl_brk_handler proc far
  245. XX!         clc                ; make sure carry is clear
  246. XX          inc    cs:interrupted        ; set the flag
  247. XX  
  248. XX  ; Make certain it isn't us that is going to get terminated.
  249. XX  ; There is a small window where the in_exec flag is set but the child is
  250. XX  ; not running yet, I assume that DOS doesn't test for ctl_brk at that time
  251. XX! ; as it is bussily creating a new process.
  252. XX          cmp    cs:in_exec,0
  253. XX!         je    just_return        ; note this implies CF == 0
  254. XX!         stc                ; set CF to abort child
  255. XX! just_return:    iret
  256. XX  ctl_brk_handler endp
  257. XX  
  258. XX  
  259. XX  ;-----------------------------------------------------------------------------
  260. XX  ; Something really nasty happened, so abort the exec call and exit.
  261. XX! ; This kills the calling process altogether, and is a very nasty way of
  262. XX  ; termination since files may still be open etc.
  263. XX  abort_exec_rhdr label near
  264. XX          mov    dx, offset error_rhdr
  265. XX***************
  266. XX*** 187,196 ****
  267. XX          jmp    print_it
  268. XX  abort_exec proc near
  269. XX          mov    dx, offset error_string
  270. XX! print_it:    mov    bx, [swap]
  271. XX          call    [free_resource+bx]
  272. XX          mov    ax, cs
  273. XX          mov    ds, ax
  274. XX          mov    ah, 9
  275. XX          int    21H
  276. XX  kill_program:    mov    ax, 04cffH            ; nuke it!
  277. XX--- 224,235 ----
  278. XX          jmp    print_it
  279. XX  abort_exec proc near
  280. XX          mov    dx, offset error_string
  281. XX! print_it:    push    dx
  282. XX!         mov    bx, [swap]
  283. XX          call    [free_resource+bx]
  284. XX          mov    ax, cs
  285. XX          mov    ds, ax
  286. XX+         pop    dx
  287. XX          mov    ah, 9
  288. XX          int    21H
  289. XX  kill_program:    mov    ax, 04cffH            ; nuke it!
  290. XX***************
  291. XX*** 402,408 ****
  292. XX  ;    - walk DOS allocation chain and write out all other segments owned by
  293. XX  ;      the current program that are contiguous with the _psp segment
  294. XX  ;    - copy the environment down to low memory
  295. XX! ;    - resize the current _psp segment to savesize+envsize.
  296. XX  ;    - free all segments belonging to program except current _psp segment
  297. XX  swap_out proc near
  298. XX          mov    ax, 05800H    ; get memory alocation strategy
  299. XX--- 441,447 ----
  300. XX  ;    - walk DOS allocation chain and write out all other segments owned by
  301. XX  ;      the current program that are contiguous with the _psp segment
  302. XX  ;    - copy the environment down to low memory
  303. XX! ;    - resize the current _psp segment to savesize
  304. XX  ;    - free all segments belonging to program except current _psp segment
  305. XX  swap_out proc near
  306. XX          mov    ax, 05800H    ; get memory alocation strategy
  307. XX***************
  308. XX*** 427,432 ****
  309. XX--- 466,472 ----
  310. XX          add    bx, ax            ; bx is size of program to keep
  311. XX          sub    si, bx            ; si is # of paragraphs to save.
  312. XX          add    di, bx            ; di is paragraph to start at
  313. XX+         mov    rootsize, bx
  314. XX          mov    resend, di        ; cs:resend is saved start para
  315. XX          mov    al, seg_no_alloc    ; set no allocation for segment
  316. XX          call    write_segment
  317. XX***************
  318. XX*** 434,441 ****
  319. XX  
  320. XX  ; We have now saved the portion of the program segment that will not remain
  321. XX  ; resident during the exec.  We should now walk the DOS allocation chain and
  322. XX! ; write out all other segments owned by the current ess. proc 
  323. XX!         mov    ax, [psp]
  324. XX          dec    ax
  325. XX          mov    es, ax
  326. XX          mov    bx, offset write_segment_data
  327. XX--- 474,481 ----
  328. XX  
  329. XX  ; We have now saved the portion of the program segment that will not remain
  330. XX  ; resident during the exec.  We should now walk the DOS allocation chain and
  331. XX! ; write out all other segments owned by the current process.
  332. XX! save_segments:    mov    ax, [psp]
  333. XX          dec    ax
  334. XX          mov    es, ax
  335. XX          mov    bx, offset write_segment_data
  336. XX***************
  337. XX*** 443,486 ****
  338. XX          jc    abort_swap_out
  339. XX  
  340. XX  ; Now we must walk the chain of allocated memory blocks again and free
  341. XX! ; all those that are owned by the current ess, proc except the one that is
  342. XX! ; the current ess' proc psp.
  343. XX! free_segments:    mov    es, [psp]
  344. XX          mov    bx, offset free_dos_segment
  345. XX          call    walk_arena_chain
  346. XX!         jnc    copy_environ
  347. XX          jmp    abort_exec_free        ; can't fix it up now.
  348. XX  
  349. XX! ; we have now written all segments that belong to the program to some
  350. XX! ; other resource.  We can now copy the environment and resize the psp
  351. XX! ; segment.
  352. XX! copy_environ:    mov    ax, [envseg]        ; get the environment segment
  353. XX!         or    ax, ax            ; skip copy if it's null
  354. XX!         je    resize_program
  355. XX!         push    ds
  356. XX!         push    es
  357. XX!         mov    bx, [resend]        ; here is where the environ goes
  358. XX!         mov    es, bx        
  359. XX!         mov    cx, [envsize]
  360. XX!         add    bx, cx
  361. XX!         sub    bx, [psp]
  362. XX!         mov    [envsize], bx        ; bx is size of program after
  363. XX!         shl    cx, 1            ; environ is copied.
  364. XX!         shl    cx, 1
  365. XX!         shl    cx, 1
  366. XX!         shl    cx, 1
  367. XX!         mov    ds, ax            ; ds:si is source address
  368. XX!         xor    si, si            ; es:di is dest address
  369. XX!         mov    di, si            ; cx is count in bytes.
  370. XX!         call    copy_data
  371. XX!         mov    [envseg], es        ; point the envseg at the
  372. XX!         pop    es            ; right spot
  373. XX!         pop    ds
  374. XX! 
  375. XX! ; We now resize the program to the size specified by cs:envsize.  This will
  376. XX! ; free the memory taken up by the current program segment.
  377. XX  resize_program: mov    es, [psp]        ; es is segment to resize.
  378. XX!         mov    bx, [envsize]        ; bx is size of segment.
  379. XX          mov    ah, 04aH        ; resize memory block
  380. XX          int    21H
  381. XX          jnc    swap_out_ok
  382. XX--- 483,502 ----
  383. XX          jc    abort_swap_out
  384. XX  
  385. XX  ; Now we must walk the chain of allocated memory blocks again and free
  386. XX! ; all those that are owned by the current process, except the one that is
  387. XX! ; the current process' psp.
  388. XX! free_segments:    mov    ax, [psp]
  389. XX!         dec    ax
  390. XX!         mov    es,ax
  391. XX          mov    bx, offset free_dos_segment
  392. XX          call    walk_arena_chain
  393. XX!         jnc    resize_program
  394. XX          jmp    abort_exec_free        ; can't fix it up now.
  395. XX  
  396. XX! ; We now resize the program to the size specified by cs:rootsize.  This will
  397. XX! ; free most of the memory taken up by the current program segment.
  398. XX  resize_program: mov    es, [psp]        ; es is segment to resize.
  399. XX!         mov    bx, [rootsize]        ; bx is size of segment.
  400. XX          mov    ah, 04aH        ; resize memory block
  401. XX          int    21H
  402. XX          jnc    swap_out_ok
  403. XX***************
  404. XX*** 513,530 ****
  405. XX  no_swap_out:    cmp    [interrupted], 0    ; were we interrupted?
  406. XX          jne    leave_exec        ; yep, so clean up, don't exec
  407. XX  
  408. XX  ; set up the parameter block for the DOS exec call.
  409. XX  ;    offset  contents
  410. XX  ;        00  segment address of environment to be passed,
  411. XX  ;          0 => use parents env.
  412. XX! ;        02  pointer to command tail for new ess. proc 
  413. XX  ;        06  pointer to fcb1
  414. XX  ;        0a  pointer to fcb2
  415. XX          mov    cx, cs
  416. XX          mov    [word ptr ex_cmdtail], offset cmdtail
  417. XX          mov    [word ptr ex_cmdtail+2], cx
  418. XX-         mov    ax, [envseg]
  419. XX-         mov    [ex_envseg], ax
  420. XX  
  421. XX  ; set up registers for exec call
  422. XX  ;    ds:dx    - pointer to pathname of program to execute
  423. XX--- 529,557 ----
  424. XX  no_swap_out:    cmp    [interrupted], 0    ; were we interrupted?
  425. XX          jne    leave_exec        ; yep, so clean up, don't exec
  426. XX  
  427. XX+ ; free passed in environment block if it is non zero.
  428. XX+ ; This way the parent program does not need to free it.
  429. XX+         mov    ax, [envseg]
  430. XX+         or    ax, ax
  431. XX+         je    setup_block
  432. XX+         push    ax
  433. XX+         mov    es, ax
  434. XX+         mov    ah, 49H
  435. XX+         int    21H
  436. XX+         pop    ax
  437. XX+ 
  438. XX  ; set up the parameter block for the DOS exec call.
  439. XX  ;    offset  contents
  440. XX  ;        00  segment address of environment to be passed,
  441. XX  ;          0 => use parents env.
  442. XX! ;        02  pointer to command tail for new process.
  443. XX  ;        06  pointer to fcb1
  444. XX  ;        0a  pointer to fcb2
  445. XX+ setup_block:    mov    ax, [envseg]
  446. XX+         mov    [ex_envseg], ax
  447. XX          mov    cx, cs
  448. XX          mov    [word ptr ex_cmdtail], offset cmdtail
  449. XX          mov    [word ptr ex_cmdtail+2], cx
  450. XX  
  451. XX  ; set up registers for exec call
  452. XX  ;    ds:dx    - pointer to pathname of program to execute
  453. XX***************
  454. XX*** 560,574 ****
  455. XX          cbw
  456. XX          mov    [retcode], ax
  457. XX  
  458. XX! leave_exec:     mov    [in_exec], 0    ; all done, reset in_exec flag
  459. XX!         cmp    [swap], 0    ; check swap, if non-zero swap back in
  460. XX          je    no_swap_in
  461. XX          call    swap_in
  462. XX- no_swap_in:    ret
  463. XX- do_exec endp
  464. XX  
  465. XX  
  466. XX  
  467. XX  ;==============================================================================
  468. XX  ; Everything past this point is overwriten with the environment and new
  469. XX  ; program after the currently executing program is swapped out.
  470. XX--- 587,605 ----
  471. XX          cbw
  472. XX          mov    [retcode], ax
  473. XX  
  474. XX! leave_exec:    cmp    [swap], 0    ; check swap, if non-zero swap back in
  475. XX          je    no_swap_in
  476. XX          call    swap_in
  477. XX  
  478. XX+ ; Clear the in_exec after the swap back in.  This way we are guaranteed to
  479. XX+ ; get parent in and the resources freed should a ^C be hit when we are reading
  480. XX+ ; the image in.
  481. XX+ no_swap_in:    mov    [in_exec], 0
  482. XX+         ret
  483. XX+ do_exec endp                
  484. XX  
  485. XX  
  486. XX+ 
  487. XX  ;==============================================================================
  488. XX  ; Everything past this point is overwriten with the environment and new
  489. XX  ; program after the currently executing program is swapped out.
  490. XX***************
  491. XX*** 596,602 ****
  492. XX  
  493. XX  
  494. XX  ;-----------------------------------------------------------------------------
  495. XX! ; This routine is used to walk the DOS alocated memory block chain and,
  496. XX  ; starting at address supplied in the es register.  For each block it
  497. XX  ; calls the routine specified by the bx register with the segment length
  498. XX  ; in si, and it's address in di.  It does not apply the routine to the
  499. XX--- 627,633 ----
  500. XX  
  501. XX  
  502. XX  ;-----------------------------------------------------------------------------
  503. XX! ; This routine is used to walk the DOS allocated memory block chain
  504. XX  ; starting at address supplied in the es register.  For each block it
  505. XX  ; calls the routine specified by the bx register with the segment length
  506. XX  ; in si, and it's address in di.  It does not apply the routine to the
  507. XX***************
  508. XX*** 612,625 ****
  509. XX          mov    di, es
  510. XX          inc    di
  511. XX          mov    ax, word ptr es:1
  512. XX          cmp    ax, cs:psp            ; is it owned by us?
  513. XX          jne    walk_done            ; NOPE!  -- all done
  514. XX!         cmp    di, cs:psp            ; make sure we don't
  515. XX!         je    next_block            ; touch our psp
  516. XX          push    di
  517. XX          push    si
  518. XX          push    bx
  519. XX!         call    bx                ; handle the segment
  520. XX          pop    bx
  521. XX          pop    si
  522. XX          pop    di
  523. XX--- 643,663 ----
  524. XX          mov    di, es
  525. XX          inc    di
  526. XX          mov    ax, word ptr es:1
  527. XX+ 
  528. XX+ ; Stop the search if the block is NOT owned by us.  Ignore our own psp block
  529. XX+ ; and our environment segment block.
  530. XX          cmp    ax, cs:psp            ; is it owned by us?
  531. XX          jne    walk_done            ; NOPE!  -- all done
  532. XX!         cmp    di, cs:envseg            ; skip our environment
  533. XX!         je    next_block
  534. XX!         cmp    di, cs:psp            ; skip our psp
  535. XX!         je    next_block
  536. XX! 
  537. XX! ; Now save state and call the routine pointed at by [bx].
  538. XX          push    di
  539. XX          push    si
  540. XX          push    bx
  541. XX!         call    bx
  542. XX          pop    bx
  543. XX          pop    si
  544. XX          pop    di
  545. XX***************
  546. XX*** 818,825 ****
  547. XX  ; This is the main entry routine into the swap code and corresponds to the
  548. XX  ; following C function call:
  549. XX  ;
  550. XX! ; exec( int swap, char far *program, char far *cmdtail,
  551. XX! ;    int environment_seg, int env_size, char far *tmpfilename );
  552. XX  ;
  553. XX  ; Exec performs the following:
  554. XX  ;    1. set up the local code segment copies of arguments to the exec call.
  555. XX--- 856,863 ----
  556. XX  ; This is the main entry routine into the swap code and corresponds to the
  557. XX  ; following C function call:
  558. XX  ;
  559. XX! ; exec( int swap, char far *program, char far *cmdtail, int environment_seg,
  560. XX! ;    char far *tmpfilename );
  561. XX  ;
  562. XX  ; Exec performs the following:
  563. XX  ;    1. set up the local code segment copies of arguments to the exec call.
  564. XX***************
  565. XX*** 827,839 ****
  566. XX  ;       stack.
  567. XX  ;    3. save old interrupt vectors for ctrl-brk.
  568. XX  ;    4. install our own handler for the ctrl-brk interrupt, our handler
  569. XX! ;       terminates the current running ess, proc and returns with non-zero
  570. XX  ;       status code.
  571. XX  ;    5. get our psp
  572. XX  ;    6. setup arguments for exec call
  573. XX  ;    7. exec the program, save result code on return.
  574. XX  ;       8. restore previous ctrl-brk and crit-error handler.
  575. XX! ;       9. restore previous ess proc stack, and segment registers.
  576. XX  ;      10. return from exec with child result code in AX
  577. XX  ;       and global _Interrupted flag set to true if child execution was
  578. XX  ;       interrupted.
  579. XX--- 865,877 ----
  580. XX  ;       stack.
  581. XX  ;    3. save old interrupt vectors for ctrl-brk.
  582. XX  ;    4. install our own handler for the ctrl-brk interrupt, our handler
  583. XX! ;       terminates the current running process, and returns with non-zero
  584. XX  ;       status code.
  585. XX  ;    5. get our psp
  586. XX  ;    6. setup arguments for exec call
  587. XX  ;    7. exec the program, save result code on return.
  588. XX  ;       8. restore previous ctrl-brk and crit-error handler.
  589. XX! ;       9. restore previous process stack, and segment registers.
  590. XX  ;      10. return from exec with child result code in AX
  591. XX  ;       and global _Interrupted flag set to true if child execution was
  592. XX  ;       interrupted.
  593. XX***************
  594. XX*** 862,869 ****
  595. XX          mov    es:swap, ax
  596. XX          mov    ax, ss:[a_env]        ; save env seg to use
  597. XX          mov    es:envseg, ax
  598. XX-         mov    ax, ss:[a_esiz]        ; get environment's size
  599. XX-         mov    es:envsize, ax
  600. XX  
  601. XX          mov     di, offset cs:cmdpath    ; copy the command
  602. XX          lds     si, ss:[a_prog]        ; 65 bytes worth
  603. XX--- 900,905 ----
  604. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/config.mk    Thu Oct  4 09:24:52 1990
  605. XX--- msdos/config.mk    Sun Oct 28 23:16:14 1990
  606. XX***************
  607. XX*** 6,12 ****
  608. XX  
  609. XX  # Memory model to compile for
  610. XX  # set to s - small, m - medium, c - compact, l - large
  611. XX! MODEL = c
  612. XX  
  613. XX  STARTUPFILE    = $(OS)/startup.mk
  614. XX  
  615. XX--- 6,16 ----
  616. XX  
  617. XX  # Memory model to compile for
  618. XX  # set to s - small, m - medium, c - compact, l - large
  619. XX! .IF $(DEBUG)
  620. XX!    MODEL = l
  621. XX! .ELSE
  622. XX!    MODEL = c
  623. XX! .END
  624. XX  
  625. XX  STARTUPFILE    = $(OS)/startup.mk
  626. XX  
  627. XX***************
  628. XX*** 18,25 ****
  629. XX  LDTMPLIB    = <+$(LDLIBS:s,/,\\,:t"+\n")\n+>
  630. XX  
  631. XX  # Debug flags
  632. XX! DB_CFLAGS    = -DDBUG -v
  633. XX! DB_LDFLAGS    = /v
  634. XX  DB_LDLIBS    =
  635. XX  
  636. XX  # NO Debug flags
  637. XX--- 22,29 ----
  638. XX  LDTMPLIB    = <+$(LDLIBS:s,/,\\,:t"+\n")\n+>
  639. XX  
  640. XX  # Debug flags
  641. XX! DB_CFLAGS    = -DDBUG
  642. XX! DB_LDFLAGS    =
  643. XX  DB_LDLIBS    =
  644. XX  
  645. XX  # NO Debug flags
  646. XX***************
  647. XX*** 31,38 ****
  648. XX  CFLAGS         += -I$(OS)
  649. XX  
  650. XX  # Common MSDOS source files.
  651. XX! # Define NOSWAP to non-null for the swap code to be excluded on making.
  652. XX! .IF $(NOSWAP) == $(NULL)
  653. XX     SWP_SRC = find.c spawn.c
  654. XX     ASRC += exec.asm
  655. XX  .END
  656. XX--- 35,44 ----
  657. XX  CFLAGS         += -I$(OS)
  658. XX  
  659. XX  # Common MSDOS source files.
  660. XX! # Define SWAP to anything but 'y' for the swap code to be excluded on making.
  661. XX! # Swapping for DOS versions is enabled by default.
  662. XX! SWAP *= y
  663. XX! .IF $(SWAP) == y
  664. XX     SWP_SRC = find.c spawn.c
  665. XX     ASRC += exec.asm
  666. XX  .END
  667. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/msdos/arlib.c    Sat Oct  6 12:05:18 1990
  668. XX--- msdos/arlib.c    Mon Oct 22 16:53:32 1990
  669. XX***************
  670. XX*** 1,4 ****
  671. XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/arlib.c,v 1.1 90/10/06 12:05:19 dvadura Exp $
  672. XX  -- SYNOPSIS -- Library access code.
  673. XX  -- 
  674. XX  -- DESCRIPTION
  675. XX--- 1,4 ----
  676. XX! /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/msdos/RCS/arlib.c,v 1.1 90/10/06 12:05:19 dvadura Exp Locker: dvadura $
  677. XX  -- SYNOPSIS -- Library access code.
  678. XX  -- 
  679. XX  -- DESCRIPTION
  680. XX***************
  681. XX*** 35,41 ****
  682. XX  
  683. XX  #include "extern.h"
  684. XX  #include "stdmacs.h"
  685. XX- #include "vextern.h"
  686. XX  
  687. XX  time_t
  688. XX  seek_arch(name, lib)
  689. XX--- 35,40 ----
  690. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/man/dmake.tf    Sat Oct  6 12:05:02 1990
  691. XX--- man/dmake.tf    Sun Oct 28 13:26:42 1990
  692. XX***************
  693. XX*** 3,15 ****
  694. XX  .ds TB "0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.5i +0.5i +2.0i
  695. XX  .de Ip
  696. XX  .fi
  697. XX! .nr Ip \w\\$1 
  698. XX  .IP "\\$1" \\n(Ipu
  699. XX  \\$2
  700. XX  .nf
  701. XX  ..
  702. XX  .de Is
  703. XX! .nr )I \w\\$1u
  704. XX  ..
  705. XX  .de Ii
  706. XX  .in \\n()Ru
  707. XX--- 3,15 ----
  708. XX  .ds TB "0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.5i +0.5i +2.0i
  709. XX  .de Ip
  710. XX  .fi
  711. XX! .nr Ip \w'\\$1 '
  712. XX  .IP "\\$1" \\n(Ipu
  713. XX  \\$2
  714. XX  .nf
  715. XX  ..
  716. XX  .de Is
  717. XX! .nr )I \w'\\$1'u
  718. XX  ..
  719. XX  .de Ii
  720. XX  .in \\n()Ru
  721. XX***************
  722. XX*** 50,57 ****
  723. XX  .B -f
  724. XX  flag then \fBdmake\fR uses standard input as the source of the makefile text.
  725. XX  .PP
  726. XX! Any macro definitions (arguments with embedded
  727. XX! .Q "="
  728. XX  signs) that appear on the command line are processed first
  729. XX  and supercede definitions for macros of the same name found
  730. XX  within the makefile.  In general it is impossible for definitions found
  731. XX--- 50,56 ----
  732. XX  .B -f
  733. XX  flag then \fBdmake\fR uses standard input as the source of the makefile text.
  734. XX  .PP
  735. XX! Any macro definitions (arguments with embedded "="
  736. XX  signs) that appear on the command line are processed first
  737. XX  and supercede definitions for macros of the same name found
  738. XX  within the makefile.  In general it is impossible for definitions found
  739. XX***************
  740. XX*** 77,85 ****
  741. XX  section found at the end of this document.
  742. XX  .SH OPTIONS
  743. XX  .IP "\fB\-A\fR"
  744. XX! Enable AUGMAKE special inference rule transformations (see the
  745. XX! .Q "PERCENT(%) RULES"
  746. XX! section), these are set to off by default.
  747. XX  .IP "\fB\-e\fR"
  748. XX  Read the environment and define all strings of the
  749. XX  form '\fBENV-VAR\fP=\fIevalue\fP'
  750. XX--- 76,83 ----
  751. XX  section found at the end of this document.
  752. XX  .SH OPTIONS
  753. XX  .IP "\fB\-A\fR"
  754. XX! Enable AUGMAKE special inference rule transformations
  755. XX! (see the "PERCENT(%) RULES" section), these are set to off by default.
  756. XX  .IP "\fB\-e\fR"
  757. XX  Read the environment and define all strings of the
  758. XX  form '\fBENV-VAR\fP=\fIevalue\fP'
  759. XX***************
  760. XX*** 120,128 ****
  761. XX  (useful for debugging, but cannot be re-read by \fBdmake\fP)
  762. XX  .IP "\fB\-P#\fR"
  763. XX  On systems that support multi-processing cause \fBdmake\fP to use \fI#\fP
  764. XX! concurrent child processes to make targets.  See the
  765. XX! .Q "MULTI PROCESSING"
  766. XX! section for more information.
  767. XX  .IP "\fB\-q\fR"
  768. XX  Check and see if the target is up to date.  Exits with code 0 if up to date,
  769. XX  1 otherwise.
  770. XX--- 118,125 ----
  771. XX  (useful for debugging, but cannot be re-read by \fBdmake\fP)
  772. XX  .IP "\fB\-P#\fR"
  773. XX  On systems that support multi-processing cause \fBdmake\fP to use \fI#\fP
  774. XX! concurrent child processes to make targets.
  775. XX! See the "MULTI PROCESSING" section for more information.
  776. XX  .IP "\fB\-q\fR"
  777. XX  Check and see if the target is up to date.  Exits with code 0 if up to date,
  778. XX  1 otherwise.
  779. XX***************
  780. XX*** 718,724 ****
  781. XX  Thus using another example we have:
  782. XX  .RS
  783. XX  .sp
  784. XX! .Is "test/{ f1  ""f2"" """" }.o    "
  785. XX  .Ii "test/{f1 f2}.o"
  786. XX  --> test/f1.o test/f2.o
  787. XX  .Ii "test/ {f1 f2}.o"
  788. XX--- 715,721 ----
  789. XX  Thus using another example we have:
  790. XX  .RS
  791. XX  .sp
  792. XX! .Is "test/{ f1  f2 }.o    "
  793. XX  .Ii "test/{f1 f2}.o"
  794. XX  --> test/f1.o test/f2.o
  795. XX  .Ii "test/ {f1 f2}.o"
  796. XX***************
  797. XX*** 725,732 ****
  798. XX  --> test/ f1.o f2.o
  799. XX  .Ii "test/{f1 f2} .o"
  800. XX  --> test/f1 test/f2 .o
  801. XX! .Ii "test/{ f1  ""f2"" """" }.o"
  802. XX! --> test/f1.o test/f2.o test/.o
  803. XX  .sp
  804. XX  .Ii and
  805. XX  .sp
  806. XX--- 722,729 ----
  807. XX  --> test/ f1.o f2.o
  808. XX  .Ii "test/{f1 f2} .o"
  809. XX  --> test/f1 test/f2 .o
  810. XX! .Ii "test/{ "f1"  """" }.o"
  811. XX! --> test/f1.o test/.o
  812. XX  .sp
  813. XX  .Ii and
  814. XX  .sp
  815. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/man/dmake.p    Sat Oct  6 12:26:44 1990
  816. XX--- man/dmake.p    Sun Oct 28 13:27:42 1990
  817. XX***************
  818. XX*** 869,879 ****
  819. XX       A null token in the token list is specified using "".  Thus
  820. XX       using another example we have:
  821. XX  
  822. XX!           test/{f1 f2}.o            --> test/f1.o test/f2.o
  823. XX!           test/ {f1 f2}.o           --> test/ f1.o f2.o
  824. XX!           test/{f1 f2} .o           --> test/f1 test/f2 .o
  825. XX!           test/{ f1  "f2" "" }.o    --> test/f1.o test/f2.o
  826. XX!                                     test/.o
  827. XX  
  828. XX            and
  829. XX  
  830. XX--- 869,878 ----
  831. XX       A null token in the token list is specified using "".  Thus
  832. XX       using another example we have:
  833. XX  
  834. XX!           test/{f1 f2}.o       --> test/f1.o test/f2.o
  835. XX!           test/ {f1 f2}.o      --> test/ f1.o f2.o
  836. XX!           test/{f1 f2} .o      --> test/f1 test/f2 .o
  837. XX!           test/{               --> test/f1.o test/.o
  838. XX  
  839. XX            and
  840. XX  
  841. XX***************
  842. XX*** 890,895 ****
  843. XX--- 889,895 ----
  844. XX       dencies.  Such entries are called _t_a_r_g_e_t_/_p_r_e_r_e_q_u_i_s_i_t_e or
  845. XX       _r_u_l_e definitions.  Each rule definition is optionally fol-
  846. XX       lowed by a set of lines that provide a recipe for updating
  847. XX+      any targets defined by the rule.  Whenever ddmmaakkee attempts to
  848. XX  
  849. XX  
  850. XX  
  851. XX***************
  852. XX*** 902,908 ****
  853. XX  
  854. XX  
  855. XX  
  856. XX-      any targets defined by the rule.  Whenever ddmmaakkee attempts to
  857. XX       bring a target up to date and an explicit recipe is provided
  858. XX       with a rule defining the target, that recipe is used to
  859. XX       update the target.  A rule definition begins with a line
  860. XX--- 902,907 ----
  861. XX***************
  862. XX*** 954,959 ****
  863. XX--- 953,959 ----
  864. XX  
  865. XX       --    says to clear the previous list of prerequisites before
  866. XX            adding the new prerequisites.  Thus,
  867. XX+ 
  868. XX  
  869. XX  
  870. XX  
  871. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/man/dmake.nc    Sat Oct  6 12:26:46 1990
  872. XX--- man/dmake.nc    Mon Oct 29 20:29:13 1990
  873. XX***************
  874. XX*** 869,879 ****
  875. XX       A null token in the token list is specified using "".  Thus
  876. XX       using another example we have:
  877. XX  
  878. XX!           test/{f1 f2}.o            --> test/f1.o test/f2.o
  879. XX!           test/ {f1 f2}.o           --> test/ f1.o f2.o
  880. XX!           test/{f1 f2} .o           --> test/f1 test/f2 .o
  881. XX!           test/{ f1  "f2" "" }.o    --> test/f1.o test/f2.o
  882. XX!                                     test/.o
  883. XX  
  884. XX            and
  885. XX  
  886. XX--- 869,878 ----
  887. XX       A null token in the token list is specified using "".  Thus
  888. XX       using another example we have:
  889. XX  
  890. XX!           test/{f1 f2}.o       --> test/f1.o test/f2.o
  891. XX!           test/ {f1 f2}.o      --> test/ f1.o f2.o
  892. XX!           test/{f1 f2} .o      --> test/f1 test/f2 .o
  893. XX!           test/{               --> test/f1.o test/.o
  894. XX  
  895. XX            and
  896. XX  
  897. XX***************
  898. XX*** 890,895 ****
  899. XX--- 889,895 ----
  900. XX       dencies.  Such entries are called target/prerequisite or
  901. XX       rule definitions.  Each rule definition is optionally fol-
  902. XX       lowed by a set of lines that provide a recipe for updating
  903. XX+      any targets defined by the rule.  Whenever dmake attempts to
  904. XX  
  905. XX  
  906. XX  
  907. XX***************
  908. XX*** 902,908 ****
  909. XX  
  910. XX  
  911. XX  
  912. XX-      any targets defined by the rule.  Whenever dmake attempts to
  913. XX       bring a target up to date and an explicit recipe is provided
  914. XX       with a rule defining the target, that recipe is used to
  915. XX       update the target.  A rule definition begins with a line
  916. XX--- 902,907 ----
  917. XX***************
  918. XX*** 954,959 ****
  919. XX--- 953,959 ----
  920. XX  
  921. XX       -    says to clear the previous list of prerequisites before
  922. XX            adding the new prerequisites.  Thus,
  923. XX+ 
  924. XX  
  925. XX  
  926. XX  
  927. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/makefile.mk    Tue Oct  9 21:19:30 1990
  928. XX--- makefile.mk    Tue Oct 30 13:24:08 1990
  929. XX***************
  930. XX*** 9,15 ****
  931. XX  #
  932. XX  # Valid values for the above macros are:
  933. XX  #
  934. XX! #    OS            - unix, msdos
  935. XX  #       OSRELEASE     - bsd43, sysvr3, 386ix
  936. XX  #              - tccdos, mscdos  (valid only of OS == msdos)
  937. XX  #       OSENVIRONMENT - uw {valid for unix, bsd43 configuration only.}
  938. XX--- 9,15 ----
  939. XX  #
  940. XX  # Valid values for the above macros are:
  941. XX  #
  942. XX! #    OS            - unix, msdos, tos
  943. XX  #       OSRELEASE     - bsd43, sysvr3, 386ix
  944. XX  #              - tccdos, mscdos  (valid only of OS == msdos)
  945. XX  #       OSENVIRONMENT - uw {valid for unix, bsd43 configuration only.}
  946. XX***************
  947. XX*** 153,162 ****
  948. XX  #
  949. XX  #    dmake scripts    -- makes all the script files at once.
  950. XX  #
  951. XX! SH = $(@:s/swp-/-/:s,-,/,:s/scripts/${SCRIPTFILE}/:s/c60d/cd/)
  952. XX! MS = MAKESTARTUP=$(@:s/swp-/-/:s,-,/,:s/scripts/startup.mk/:s/c60d/cd/)
  953. XX  
  954. XX! scripts: unix-scripts msdos-scripts
  955. XX  
  956. XX  # To add a new environment for UNIX, simply create the appropriate entry
  957. XX  # in the style below for the macro which contains the OS, OSRELEASE and
  958. XX--- 153,164 ----
  959. XX  #
  960. XX  #    dmake scripts    -- makes all the script files at once.
  961. XX  #
  962. XX! SH_n = $(@:s/swp-/-/:s,-,/,:s/scripts/${SCRIPTFILE}/)
  963. XX! MS_n = MAKESTARTUP=$(@:s/swp-/-/:s,-,/,:s/scripts/startup.mk/)
  964. XX! SH = $(SH_n:s/c40d/cd/:s/c50d/cd/:s/c51d/cd/:s/c60d/cd/)
  965. XX! MS = $(MS_n:s/c40d/cd/:s/c50d/cd/:s/c51d/cd/:s/c60d/cd/)
  966. XX  
  967. XX! scripts: unix-scripts atari-tos-scripts msdos-scripts
  968. XX  
  969. XX  # To add a new environment for UNIX, simply create the appropriate entry
  970. XX  # in the style below for the macro which contains the OS, OSRELEASE and
  971. XX***************
  972. XX*** 169,176 ****
  973. XX  unix-386ix-scripts-flags   = OS=unix OSRELEASE=386ix  OSENVIRONMENT=
  974. XX  unix-bsd43-uw-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=uw
  975. XX  unix-bsd43-vf-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=vf
  976. XX  
  977. XX! unix-scripts: clean
  978. XX      $(MAKE) SCRIPTFILE=make.sh unix-bsd43-scripts
  979. XX      $(MAKE) SCRIPTFILE=make.sh unix-bsd43-uw-scripts
  980. XX      $(MAKE) SCRIPTFILE=make.sh unix-bsd43-vf-scripts
  981. XX--- 171,179 ----
  982. XX  unix-386ix-scripts-flags   = OS=unix OSRELEASE=386ix  OSENVIRONMENT=
  983. XX  unix-bsd43-uw-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=uw
  984. XX  unix-bsd43-vf-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=vf
  985. XX+ tos--scripts-flags          = OS=tos  OSRELEASE=       OSENVIRONMENT=
  986. XX  
  987. XX! unix-scripts .SWAP : clean
  988. XX      $(MAKE) SCRIPTFILE=make.sh unix-bsd43-scripts
  989. XX      $(MAKE) SCRIPTFILE=make.sh unix-bsd43-uw-scripts
  990. XX      $(MAKE) SCRIPTFILE=make.sh unix-bsd43-vf-scripts
  991. XX***************
  992. XX*** 178,185 ****
  993. XX      $(MAKE) SCRIPTFILE=make.sh unix-sysvr1-scripts
  994. XX      $(MAKE) SCRIPTFILE=make.sh unix-386ix-scripts
  995. XX  
  996. XX! unix-%-scripts:; $(MAKECMD) -ns $(MS) $($@-flags) >$(SH)
  997. XX  
  998. XX  # We make the standard dos scripts here, but we have to go and fix up the
  999. XX  # make.bat file since it contains names of temporary files for the response
  1000. XX  # files required by the linker.  We need to also construct the response file
  1001. XX--- 181,192 ----
  1002. XX      $(MAKE) SCRIPTFILE=make.sh unix-sysvr1-scripts
  1003. XX      $(MAKE) SCRIPTFILE=make.sh unix-386ix-scripts
  1004. XX  
  1005. XX! unix-%-scripts .SWAP :; $(MAKECMD) -ns $(MS) $($@-flags) >$(SH)
  1006. XX! tos-%-scripts  .SWAP :; $(MAKECMD) -ns $(MS) $($@-flags) >$(SH)
  1007. XX  
  1008. XX+ atari-tos-scripts .SWAP : clean
  1009. XX+     $(MAKE) SCRIPTFILE=make.sh tos--scripts
  1010. XX+ 
  1011. XX  # We make the standard dos scripts here, but we have to go and fix up the
  1012. XX  # make.bat file since it contains names of temporary files for the response
  1013. XX  # files required by the linker.  We need to also construct the response file
  1014. XX***************
  1015. XX*** 190,216 ****
  1016. XX  # unix environment, and then make certain that the fix-msdos-%-scripts target
  1017. XX  # performs the correct function for the new environment.
  1018. XX  msdos-cf = OS=msdos OSENVIRONMENT=
  1019. XX! msdos-tccdos-scripts-flags = $(msdos-cf) OSRELEASE=tccdos NOSWAP=y
  1020. XX  msdos-tccdosswp-scripts-flags = $(msdos-cf) OSRELEASE=tccdos
  1021. XX! msdos-mscdos-scripts-flags = $(msdos-cf) OSRELEASE=mscdos NOSWAP=y
  1022. XX! msdos-msc60dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos NOSWAP=y MSC_VER=6.0
  1023. XX! msdos-mscdosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos
  1024. XX  msdos-msc60dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=6.0
  1025. XX  
  1026. XX! msdos-scripts: clean
  1027. XX      $(MAKE) SCRIPTFILE=mk.bat msdos-tccdos-scripts
  1028. XX      $(MAKE) SCRIPTFILE=mkswp.bat msdos-tccdosswp-scripts
  1029. XX-     $(MAKE) SCRIPTFILE=mk.bat msdos-mscdos-scripts
  1030. XX-     $(MAKE) SCRIPTFILE=mk60.bat msdos-msc60dos-scripts
  1031. XX-     $(MAKE) SCRIPTFILE=mkswp.bat msdos-mscdosswp-scripts
  1032. XX-     $(MAKE) SCRIPTFILE=mk60swp.bat msdos-msc60dosswp-scripts
  1033. XX  
  1034. XX! msdos-%-scripts:
  1035. XX      $(MAKE) -nus $(MS) $($@-flags) >$(SH)
  1036. XX      $(MAKE) -s $(MAKEMACROS) $(MS) $($@-flags) fix-msdos-$*-scripts
  1037. XX  
  1038. XX! MAPOBJ = $(*:s/tccdos/obj/:s/mscdos/obj/:s/msc60dos/obj60/).rsp
  1039. XX! MAPLIB = $(*:s/tccdos/lib/:s/mscdos/lib/:s/msc60dos/lib60/).rsp
  1040. XX  OBJRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPOBJ},)
  1041. XX  LIBRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPLIB},)
  1042. XX  DOSOBJ = $(CSTARTUP) $(OBJDIR)/{$(OBJECTS)}
  1043. XX--- 197,230 ----
  1044. XX  # unix environment, and then make certain that the fix-msdos-%-scripts target
  1045. XX  # performs the correct function for the new environment.
  1046. XX  msdos-cf = OS=msdos OSENVIRONMENT=
  1047. XX! msdos-tccdos-scripts-flags = $(msdos-cf) OSRELEASE=tccdos SWAP=n
  1048. XX  msdos-tccdosswp-scripts-flags = $(msdos-cf) OSRELEASE=tccdos
  1049. XX! msdos-msc40dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=4.0
  1050. XX! msdos-msc40dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=4.0
  1051. XX! msdos-msc50dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=5.0
  1052. XX! msdos-msc50dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=5.0
  1053. XX! msdos-msc51dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=5.1
  1054. XX! msdos-msc51dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=5.1
  1055. XX! msdos-msc60dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos SWAP=n MSC_VER=6.0
  1056. XX  msdos-msc60dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=6.0
  1057. XX  
  1058. XX! msdos-scripts: clean tcc-scripts msc-scripts;
  1059. XX! 
  1060. XX! tcc-scripts .SWAP :
  1061. XX      $(MAKE) SCRIPTFILE=mk.bat msdos-tccdos-scripts
  1062. XX      $(MAKE) SCRIPTFILE=mkswp.bat msdos-tccdosswp-scripts
  1063. XX  
  1064. XX! msc-scripts .SWAP :! 40 50 51 60
  1065. XX!     $(MAKE) SCRIPTFILE=mk$?.bat msdos-msc$?dos-scripts
  1066. XX!     $(MAKE) SCRIPTFILE=mk$?swp.bat msdos-msc$?dosswp-scripts
  1067. XX! 40 50 51 60:;
  1068. XX! 
  1069. XX! msdos-%-scripts .SWAP :
  1070. XX      $(MAKE) -nus $(MS) $($@-flags) >$(SH)
  1071. XX      $(MAKE) -s $(MAKEMACROS) $(MS) $($@-flags) fix-msdos-$*-scripts
  1072. XX  
  1073. XX! MAPOBJ = obj$(SWAP:s/y/swp/:s/n//).rsp
  1074. XX! MAPLIB = lib$(SWAP:s/y/swp/:s/n//).rsp
  1075. XX  OBJRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPOBJ},)
  1076. XX  LIBRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPLIB},)
  1077. XX  DOSOBJ = $(CSTARTUP) $(OBJDIR)/{$(OBJECTS)}
  1078. XX*** /u2/dvadura/src/generic/dmake/src-patchlvl1/makefile    Sat Oct  6 12:04:34 1990
  1079. XX--- makefile    Tue Oct 30 13:23:40 1990
  1080. XX***************
  1081. XX*** 12,35 ****
  1082. XX      @echo "   make bsd43vf       - Generic BSD 4.3 that needs vfprintf"
  1083. XX      @echo "   make sysvr3        - Generic SysV R3 UNIX"
  1084. XX      @echo "   make sysvr1        - Generic SysV R1 UNIX"
  1085. XX-     @echo "   make 386ix         - 386/ix (SysV R3) [NOTE: not tested]"
  1086. XX      @echo "   make dynix         - Sequent DYNIX system"
  1087. XX      @echo "   make ultrix        - Ultrix 3.0 system"
  1088. XX      @echo "   make mips          - Any MIPS box"
  1089. XX      @echo "   make tcc           - DOS with tcc 2.0"
  1090. XX      @echo "   make tccswp        - swapping DOS version with tcc 2.0"
  1091. XX!     @echo "   make msc           - DOS with MSC 4.0 to 5.1"
  1092. XX      @echo "   make msc60         - DOS with MSC 6.0"
  1093. XX!     @echo "   make mscswp        - swapping DOS version with MSC 4.0 to 5.1"
  1094. XX      @echo "   make msc60swp      - swapping DOS version with MSC 6.0"
  1095. XX  
  1096. XX  bsd43uw :; /bin/sh -x < unix/bsd43/uw/make.sh
  1097. XX  bsd43vf dynix mips        :; /bin/sh -x < unix/bsd43/vf/make.sh
  1098. XX  sysvr1 sysvr3 bsd43 386ix :; /bin/sh -x < unix/$@/make.sh
  1099. XX! ultrix : sysvr3;
  1100. XX  
  1101. XX  # DOS with some form of make and sh
  1102. XX  # Note if you do not have a 'make and/or sh' program under MSDOS then
  1103. XX  # typing 'make' in the dmake distribution directory will invoke the make.bat
  1104. SHAR_EOF
  1105. echo "End of part 4, continue with part 5"
  1106. echo "5" > s2_seq_.tmp
  1107. exit 0
  1108.  
  1109.